package com.holyn.guofang.utils;

import android.text.Html;
import android.text.Spanned;

/**
 * Created by Holyn on 2017/8/29.
 */

public class HtmlUtil {
    public static Spanned fromHtml(String text){
        Spanned result;
        if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.N) {
            result = Html.fromHtml(text,Html.FROM_HTML_MODE_LEGACY);
        } else {
            result = Html.fromHtml(text);
        }
        return result;
    }
}
